<?php

namespace app\admin\validate;

use think\Validate;

class PayView extends Validate
{
    //字段规则
    protected $rule = [
        'data_id' => 'require',
        'group' => 'require',
        'type' => 'require',
        'generate_type' => 'require',
        'user_id' => 'require',
        'amount_money' => 'require',
    ];

    //验证器提示信息
    protected $message = [
        'group.require' => '请选择业务类型',
        'data_id.require' => '对应支付业务的订单id不能为空',
        'type.require' => '请选择支付业务类型',
        'generate_type.require' => '生成类型不能为空',
        'user_id.require' => '用户不能为空',
        'amount_money.require' => '支付金额不能为空'
    ];

    //使用场景
    protected $scene = [
        'edit'   => ['data_id','group','type','generate_type','user_id','amount_money'],
        'add'   => ['data_id','group','type','generate_type','user_id','amount_money'],
    ];
}